﻿<sdk:Page x:Class="SampleBrowser.Views.SampleGlyphsMetrics" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Glyphs Metrics">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" 
                           Text="Glyphs Metrics"/>

        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,4,0,10">
            <TextBlock Text="Font:" VerticalAlignment="Center" />
            <ComboBox x:Name="cmbFont" DisplayMemberPath="Name" Margin="4" SelectionChanged="cmbFont_SelectionChanged" />
            <Button x:Name="FromDisk" Margin="4" Padding="7" Click="FromDisk_Click">
                <Button.Content>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="/SampleBrowser;component/Assets/Icons/open.png" />
                        <TextBlock Text="Select font from disk..." Margin="4,0,0,0" FontWeight="Normal" />
                    </StackPanel>
                </Button.Content>
            </Button>
        </StackPanel>

        <ScrollViewer Grid.Row="2" Style="{StaticResource PageScrollViewerStyle}">
            <Canvas >
                <Canvas x:Name="rectangles" MouseMove="OnMouseMove" />
                <Canvas x:Name="metrics" />

                <Glyphs x:Name="sampleText" OriginX="0" OriginY="40" Fill="Black" IsHitTestVisible="False" FontRenderingEmSize="32" UnicodeString="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ" />
                <Glyphs x:Name="sampleText2" OriginX="0" OriginY="120" Fill="Black" IsHitTestVisible="False" FontRenderingEmSize="48" UnicodeString="The quick brown fox jumps" />
                <Glyphs x:Name="sampleText3" OriginX="0" OriginY="240" Fill="Black" IsHitTestVisible="False" FontRenderingEmSize="72" UnicodeString="over the lazy dog." />
                <Glyphs x:Name="sampleText4" OriginX="0" OriginY="380" Fill="Black" IsHitTestVisible="False" FontRenderingEmSize="96" UnicodeString="1234567890.:,;'&quot;(!?)+-*/=" />
            </Canvas>
        </ScrollViewer>
    </Grid>
</sdk:Page>
